
a=input("请输入星期几的第1个字母: ")

if a == 'M' or a == 'm':
    print("Monday")
elif a == 'W' or a == 'w':
    print("Wednesday")
elif a == 'S' or a == 's':
    a=input("请输入星期几的第2个字母: ")
    if a == 'a' or a == 'A':
        print("Saturday")
    elif a == 'u' or a == 'U':
        print("Sunday")
    else:
        print("非法日期")
elif a == 'F' or a == 'f':
    print("Friday")
elif a == 'T' or a == 't':
    a=input("请输入星期几的第2个字母: ")
    if a == 'u' or a == 'U':
        print("Tuesday")
    elif a =='h' or a == 'H':
        print("Thursday")
    else:
        print("非法日期")
else:
    print("非法日期")
